home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1997-02-26 | 76.0 KB | 2,654 lines | [ TEXT/MPS ]
; ; File: QuickTimeMusic.a ; ; Contains: QuickTime interfaces ; ; Version: Technology: ; Release: QuickTime 2.5 interfaces to use with ETO #20 ; ; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved. ; ; Bugs?: If you find a problem with this file, send the file and version ; information (from above) and the problem description to: ; ; Internet: apple.bugs@applelink.apple.com ; AppleLink: APPLE.BUGS ; ; IF &TYPE('__QUICKTIMEMUSIC__') = 'UNDEFINED' THEN __QUICKTIMEMUSIC__ SET 1 IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN include 'Components.a' ENDIF IF &TYPE('__IMAGECOMPRESSION__') = 'UNDEFINED' THEN include 'ImageCompression.a' ENDIF IF &TYPE('__MOVIES__') = 'UNDEFINED' THEN include 'Movies.a' ENDIF IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN include 'Quickdraw.a' ENDIF IF &TYPE('__VIDEO__') = 'UNDEFINED' THEN include 'Video.a' ENDIF IF &TYPE('__MEMORY__') = 'UNDEFINED' THEN include 'Memory.a' ENDIF IF &TYPE('__SOUND__') = 'UNDEFINED' THEN include 'Sound.a' ENDIF kaiToneDescType EQU 'tone' kaiNoteRequestInfoType EQU 'ntrq' kaiKnobListType EQU 'knbl' kaiKeyRangeInfoType EQU 'sinf' kaiSampleDescType EQU 'sdsc' kaiSampleInfoType EQU 'smin' kaiSampleDataType EQU 'sdat' kaiInstInfoType EQU 'iinf' kaiPictType EQU 'pict' kaiWriterType EQU '©wrt' kaiCopyrightType EQU '©cpy' kaiOtherStrType EQU 'str ' kaiInstrumentRefType EQU 'iref' kaiLibraryInfoType EQU 'linf' kaiLibraryDescType EQU 'ldsc' InstLibDescRec RECORD 0 libIDName ds Str31 ; offset: $0 (0) sizeof EQU * ; size: $20 (32) ENDR InstKnobRec RECORD 0 number ds.l 1 ; offset: $0 (0) value ds.l 1 ; offset: $4 (4) sizeof EQU * ; size: $8 (8) ENDR kInstKnobMissingUnknown EQU 0 kInstKnobMissingDefault EQU $01 InstKnobList RECORD 0 knobCount ds.l 1 ; offset: $0 (0) knobFlags ds.l 1 ; offset: $4 (4) knob ds InstKnobRec ; offset: $8 (8) <-- really an array of length one sizeof EQU * ; size: $10 (16) ENDR kMusicLoopTypeNormal EQU 0 kMusicLoopTypePalindrome EQU 1 ; back & forth instSamplePreProcessFlag EQU $01 InstSampleDescRec RECORD 0 dataFormat ds.l 1 ; offset: $0 (0) numChannels ds.w 1 ; offset: $4 (4) sampleSize ds.w 1 ; offset: $6 (6) sampleRate ds.l 1 ; offset: $8 (8) sampleDataID ds.w 1 ; offset: $C (12) offset ds.l 1 ; offset: $E (14) ; offset within SampleData - this could be just for internal use numSamples ds.l 1 ; offset: $12 (18) ; this could also just be for internal use, we'll see loopType ds.l 1 ; offset: $16 (22) loopStart ds.l 1 ; offset: $1A (26) loopEnd ds.l 1 ; offset: $1E (30) pitchNormal ds.l 1 ; offset: $22 (34) pitchLow ds.l 1 ; offset: $26 (38) pitchHigh ds.l 1 ; offset: $2A (42) sizeof EQU * ; size: $2E (46) ENDR ; typedef Handle AtomicInstrument ; typedef Ptr AtomicInstrumentPtr kMusicComponentType EQU 'musi' kSoftSynthComponentSubType EQU 'ss ' kGMSynthComponentSubType EQU 'gm ' ; typedef ComponentInstance MusicComponent ; MusicSynthesizerFlags kSynthesizerDynamicVoice EQU $01 ; can assign voices on the fly (else, polyphony is very important kSynthesizerUsesMIDIPort EQU $02 ; must be patched through MIDI Manager kSynthesizerMicrotone EQU $04 ; can play microtonal scales kSynthesizerHasSamples EQU $08 ; synthesizer has some use for sampled data kSynthesizerMixedDrums EQU $10 ; any part can play drum parts, total = instrument parts kSynthesizerSoftware EQU $20 ; implemented in main CPU software == uses cpu cycles kSynthesizerHardware EQU $40 ; is a hardware device (such as nubus, or maybe DSP?) kSynthesizerDynamicChannel EQU $80 ; can move any part to any channel or disable each part. (else we assume it lives on all channels in masks) kSynthesizerHogsSystemChannel EQU $0100 ; can be channelwise dynamic, but always responds on its system channel kSynthesizerSlowSetPart EQU $0400 ; SetPart() and SetPartInstrumentNumber() calls do not have rapid response, may glitch notes kSynthesizerOffline EQU $1000 ; can enter an offline synthesis mode kSynthesizerGM EQU $4000 ; synth is a GM device kSynthesizerSoundLocalization EQU $00010000 ; synth is a GM device ; ; * Note that these controller numbers ; * are _not_ identical to the MIDI controller numbers. ; * These are _signed_ 8.8 values, and the LSB's are ; * always sent to a MIDI device. Controllers 32-63 are ; * reserved (for MIDI, they are LSB's for 0-31, but we ; * always send both). ; * ; * The full range, therefore, is -128.00 to 127.7f. ; * ; * _Excepting_ _volume_, all controls default to zero. ; * ; * Pitch bend is specified in fractional semitones! No ; * more "pitch bend range" nonsense. You can bend as far ; * as you want, any time you want. ; ; typedef SInt32 MusicController kControllerModulationWheel EQU 1 kControllerBreath EQU 2 kControllerFoot EQU 4 kControllerPortamentoTime EQU 5 ; portamento on/off is omitted, 0 time = 'off' kControllerVolume EQU 7 kControllerBalance EQU 8 kControllerPan EQU 10 ; 0 - "default", 1 - n: positioned in output 1-n (incl fractions) kControllerExpression EQU 11 kControllerLever1 EQU 16 ; general purpose controllers kControllerLever2 EQU 17 ; general purpose controllers kControllerLever3 EQU 18 ; general purpose controllers kControllerLever4 EQU 19 ; general purpose controllers kControllerLever5 EQU 80 ; general purpose controllers kControllerLever6 EQU 81 ; general purpose controllers kControllerLever7 EQU 82 ; general purpose controllers kControllerLever8 EQU 83 ; general purpose controllers kControllerPitchBend EQU 32 ; positive & negative semitones, with 7 bits fraction kControllerAfterTouch EQU 33 ; aka channel pressure kControllerSustain EQU 64 ; boolean - positive for on, 0 or negative off kControllerSostenuto EQU 66 ; boolean kControllerSoftPedal EQU 67 ; boolean kControllerReverb EQU 91 kControllerTremolo EQU 92 kControllerChorus EQU 93 kControllerCeleste EQU 94 kControllerPhaser EQU 95 kControllerEditPart EQU 113 ; last 16 controllers 113-128 and above are global controllers which respond on part zero kControllerMasterTune EQU 114 kControllerMaximum EQU $7FFF ; +01111111.11111111 kControllerMinimum EQU $8000 ; -10000000.00000000 SynthesizerDescription RECORD 0 synthesizerType ds.l 1 ; offset: $0 (0) ; synthesizer type (must be same as component subtype) name ds Str31 ; offset: $4 (4) ; text name of synthesizer type flags ds.l 1 ; offset: $24 (36) ; from the above enum voiceCount ds.l 1 ; offset: $28 (40) ; maximum polyphony partCount ds.l 1 ; offset: $2C (44) ; maximum multi-timbrality (and midi channels) instrumentCount ds.l 1 ; offset: $30 (48) ; non gm, built in (rom) instruments only modifiableInstrumentCount ds.l 1 ; offset: $34 (52) ; plus n-more are user modifiable channelMask ds.l 1 ; offset: $38 (56) ; (midi device only) which channels device always uses drumPartCount ds.l 1 ; offset: $3C (60) ; maximum multi-timbrality of drum parts drumCount ds.l 1 ; offset: $40 (64) ; non gm, built in (rom) drumkits only modifiableDrumCount ds.l 1 ; offset: $44 (68) ; plus n-more are user modifiable drumChannelMask ds.l 1 ; offset: $48 (72) ; (midi device only) which channels device always uses outputCount ds.l 1 ; offset: $4C (76) ; number of audio outputs (usually two) latency ds.l 1 ; offset: $50 (80) ; response time in µSec controllers ds.l 4 ; offset: $54 (84) ; array of 128 bits gmInstruments ds.l 4 ; offset: $64 (100) ; array of 128 bits gmDrums ds.l 4 ; offset: $74 (116) ; array of 128 bits sizeof EQU * ; size: $84 (132) ENDR kVoiceCountDynamic EQU -1 ; constant to use to specify dynamic voicing ToneDescription RECORD 0 synthesizerType ds.l 1 ; offset: $0 (0) ; synthesizer type synthesizerName ds Str31 ; offset: $4 (4) ; name of instantiation of synth instrumentName ds Str31 ; offset: $24 (36) ; preferred name for human use instrumentNumber ds.l 1 ; offset: $44 (68) ; inst-number used if synth-name matches gmNumber ds.l 1 ; offset: $48 (72) ; Best matching general MIDI number sizeof EQU * ; size: $4C (76) ENDR kFirstDrumkit EQU 16384 ; (first value is "no drum". instrument numbers from 16384->16384+128 are drumkits, and for GM they are _defined_ drumkits! kLastDrumkit EQU 16512 ; InstrumentMatch kInstrumentMatchSynthesizerType EQU 1 kInstrumentMatchSynthesizerName EQU 2 kInstrumentMatchName EQU 4 kInstrumentMatchNumber EQU 8 kInstrumentMatchGMNumber EQU 16 ; KnobFlags kKnobReadOnly EQU 16 ; knob value cannot be changed by user or with a SetKnob call kKnobInterruptUnsafe EQU 32 ; only alter this knob from foreground task time (may access toolbox) kKnobKeyrangeOverride EQU 64 ; knob can be overridden within a single keyrange (software synth only) kKnobGroupStart EQU 128 ; knob is first in some logical group of knobs kKnobFixedPoint8 EQU 1024 kKnobFixedPoint16 EQU 2048 ; One of these may be used at a time. kKnobTypeNumber EQU $00 kKnobTypeGroupName EQU $1000 ; "knob" is really a group name for display purposes kKnobTypeBoolean EQU $2000 ; if range is greater than 1, its a multi-checkbox field kKnobTypeNote EQU $3000 ; knob range is equivalent to MIDI keys kKnobTypePan EQU $4000 ; range goes left/right (lose this? ) kKnobTypeInstrument EQU $5000 ; knob value = reference to another instrument number kKnobTypeSetting EQU $6000 ; knob value is 1 of n different things (eg, fm algorithms) popup menu kKnobTypeMilliseconds EQU $7000 ; knob is a millisecond time range kKnobTypePercentage EQU $8000 ; knob range is displayed as a Percentage kKnobTypeHertz EQU $9000 ; knob represents frequency kKnobTypeButton EQU $A000 ; momentary trigger push button kUnknownKnobValue EQU $7FFFFFFF ; a knob with this value means, we don't know it. kDefaultKnobValue EQU $7FFFFFFE ; used to SET a knob to its default value. KnobDescription RECORD 0 name ds Str63 ; offset: $0 (0) lowValue ds.l 1 ; offset: $40 (64) highValue ds.l 1 ; offset: $44 (68) defaultValue ds.l 1 ; offset: $48 (72) ; a default instrument is made of all default values flags ds.l 1 ; offset: $4C (76) knobID ds.l 1 ; offset: $50 (80) sizeof EQU * ; size: $54 (84) ENDR GCInstrumentData RECORD 0 tone ds ToneDescription ; offset: $0 (0) knobCount ds.l 1 ; offset: $4C (76) knob ds.l 1 ; offset: $50 (80) <-- really an array of length one sizeof EQU * ; size: $54 (84) ENDR ; typedef struct GCInstrumentData * GCInstrumentDataPtr ; typedef GCInstrumentDataPtr * GCInstrumentDataHandle InstrumentAboutInfo RECORD 0 p ds.l 1 ; offset: $0 (0) author ds Str255 ; offset: $4 (4) copyright ds Str255 ; offset: $104 (260) other ds Str255 ; offset: $204 (516) sizeof EQU * ; size: $304 (772) ENDR kMusicPacketPortLost EQU 1 ; received when application loses the default input port kMusicPacketPortFound EQU 2 ; received when application gets it back out from under someone else's claim kMusicPacketTimeGap EQU 3 ; data[0] = number of milliseconds to keep the MIDI line silent MusicMIDIPacket RECORD 0 length ds.w 1 ; offset: $0 (0) reserved ds.l 1 ; offset: $2 (2) ; if length zero, then reserved = above enum data ds.b 249 ; offset: $6 (6) ORG 256 sizeof EQU * ; size: $100 (256) ENDR notImplementedMusicErr EQU $8000F7E9 cantSendToSynthesizerErr EQU $8000F7E8 cantReceiveFromSynthesizerErr EQU $8000F7E7 illegalVoiceAllocationErr EQU $8000F7E6 illegalPartErr EQU $8000F7E5 illegalChannelErr EQU $8000F7E4 illegalKnobErr EQU $8000F7E3 illegalKnobValueErr EQU $8000F7E2 illegalInstrumentErr EQU $8000F7E1 illegalControllerErr EQU $8000F7E0 midiManagerAbsentErr EQU $8000F7DF synthesizerNotRespondingErr EQU $8000F7DE synthesizerErr EQU $8000F7DD illegalNoteChannelErr EQU $8000F7DC noteChannelNotAllocatedErr EQU $8000F7DB tunePlayerFullErr EQU $8000F7DA tuneParseErr EQU $8000F7D9 kGetAtomicInstNoExpandedSamples EQU $01 kGetAtomicInstNoOriginalSamples EQU $02 kGetAtomicInstNoSamples EQU $03 kGetAtomicInstNoKnobList EQU $04 kGetAtomicInstNoInstrumentInfo EQU $08 kGetAtomicInstOriginalKnobList EQU $10 kGetAtomicInstAllKnobs EQU $20 ; return even those that are set to default ; ; For non-gm instruments, instrument number of tone description == 0 ; If you want to speed up while running, slam the inst num with what Get instrument number returns ; All missing knobs are slammed to the default value ; kSetAtomicInstKeepOriginalInstrument EQU $01 kSetAtomicInstShareAcrossParts EQU $02 ; inst disappears when app goes away kSetAtomicInstCallerTosses EQU $04 ; the caller isn't keeping a copy around (for NASetAtomicInstrument) kSetAtomicInstCallerGuarantees EQU $08 ; the caller guarantees a copy is around kSetAtomicInstInterruptSafe EQU $10 ; dont move memory at this time (but process at next task time) kSetAtomicInstDontPreprocess EQU $80 ; perform no further preprocessing because either 1)you know the instrument is digitally clean, or 2) you got it from a GetPartAtomic kInstrumentNamesModifiable EQU 1 kInstrumentNamesBoth EQU 2 ; ; * Structures specific to the GenericMusicComponent ; kGenericMusicComponentSubtype EQU 'gene' GenericKnobDescription RECORD 0 kd ds KnobDescription ; offset: $0 (0) hw1 ds.l 1 ; offset: $54 (84) ; driver defined hw2 ds.l 1 ; offset: $58 (88) ; driver defined hw3 ds.l 1 ; offset: $5C (92) ; driver defined settingsID ds.l 1 ; offset: $60 (96) ; resource ID list for boolean and popup names sizeof EQU * ; size: $64 (100) ENDR GenericKnobDescriptionList RECORD 0 knobCount ds.l 1 ; offset: $0 (0) knob ds GenericKnobDescription ; offset: $4 (4) <-- really an array of length one sizeof EQU * ; size: $68 (104) ENDR ; typedef struct GenericKnobDescriptionList * GenericKnobDescriptionListPtr ; typedef GenericKnobDescriptionListPtr * GenericKnobDescriptionListHandle ; knobTypes for MusicDerivedSetKnob kGenericMusicKnob EQU 1 kGenericMusicInstrumentKnob EQU 2 kGenericMusicDrumKnob EQU 3 kGenericMusicGlobalController EQU 4 kGenericMusicResFirst EQU 0 kGenericMusicResMiscStringList EQU 1 ; STR# 1: synth name, 2:about author,3:aboutcopyright,4:aboutother kGenericMusicResMiscLongList EQU 2 ; Long various params, see list below kGenericMusicResInstrumentList EQU 3 ; NmLs of names and shorts, categories prefixed by '••' kGenericMusicResDrumList EQU 4 ; NmLs of names and shorts kGenericMusicResInstrumentKnobDescriptionList EQU 5 ; Knob kGenericMusicResDrumKnobDescriptionList EQU 6 ; Knob kGenericMusicResKnobDescriptionList EQU 7 ; Knob kGenericMusicResBitsLongList EQU 8 ; Long back to back bitmaps of controllers, gminstruments, and drums kGenericMusicResModifiableInstrumentHW EQU 9 ; Shrt same as the hw shorts trailing the instrument names, a shortlist kGenericMusicResGMTranslation EQU 10 ; Long 128 long entries, 1 for each gm inst, of local instrument numbers 1-n (not hw numbers) kGenericMusicResROMInstrumentData EQU 11 ; knob lists for ROM instruments, so the knob values may be known kGenericMusicResAboutPICT EQU 12 ; picture for aboutlist. must be present for GetAbout call to work kGenericMusicResLast EQU 13 ; elements of the misc long list kGenericMusicMiscLongFirst EQU 0 kGenericMusicMiscLongVoiceCount EQU 1 kGenericMusicMiscLongPartCount EQU 2 kGenericMusicMiscLongModifiableInstrumentCount EQU 3 kGenericMusicMiscLongChannelMask EQU 4 kGenericMusicMiscLongDrumPartCount EQU 5 kGenericMusicMiscLongModifiableDrumCount EQU 6 kGenericMusicMiscLongDrumChannelMask EQU 7 kGenericMusicMiscLongOutputCount EQU 8 kGenericMusicMiscLongLatency EQU 9 kGenericMusicMiscLongFlags EQU 10 kGenericMusicMiscLongFirstGMHW EQU 11 ; number to add to locate GM main instruments kGenericMusicMiscLongFirstGMDrumHW EQU 12 ; number to add to locate GM drumkits kGenericMusicMiscLongFirstUserHW EQU 13 ; First hw number of user instruments (presumed sequential) kGenericMusicMiscLongLast EQU 14 GCPart RECORD 0 hwInstrumentNumber ds.l 1 ; offset: $0 (0) ; internal number of recalled instrument controller ds.w 128 ; offset: $4 (4) ; current values for all controllers volume ds.l 1 ; offset: $104 (260) ; ctrl 7 is special case polyphony ds.l 1 ; offset: $108 (264) midiChannel ds.l 1 ; offset: $10C (268) ; 1-16 if in use id ds GCInstrumentData ; offset: $110 (272) ; ToneDescription & knoblist, uncertain length sizeof EQU * ; size: $164 (356) ENDR ; ; * Calls specific to the GenericMusicComponent ; kMusicGenericRange EQU $0100 kMusicDerivedRange EQU $0200 ; ; * Flags in GenericMusicConfigure call ; kGenericMusicDoMIDI EQU $01 ; implement normal MIDI messages for note, controllers, and program changes 0-127 kGenericMusicBank0 EQU $02 ; implement instrument bank changes on controller 0 kGenericMusicBank32 EQU $04 ; implement instrument bank changes on controller 32 kGenericMusicErsatzMIDI EQU $08 ; construct MIDI packets, but send them to the derived component kGenericMusicCallKnobs EQU $10 ; call the derived component with special knob format call kGenericMusicCallParts EQU $20 ; call the derived component with special part format call kGenericMusicCallInstrument EQU $40 ; call MusicDerivedSetInstrument for MusicSetInstrument calls kGenericMusicCallNumber EQU $80 ; call MusicDerivedSetPartInstrumentNumber for MusicSetPartInstrumentNumber calls, & don't send any C0 or bank stuff kGenericMusicCallROMInstrument EQU $0100 ; call MusicSetInstrument for MusicSetPartInstrumentNumber for "ROM" instruments, passing params from the ROMi resource kGenericMusicAllDefaults EQU $0200 ; indicates that when a new instrument is recalled, all knobs are reset to DEFAULT settings. True for GS modules OfflineSampleType RECORD 0 numChannels ds.l 1 ; offset: $0 (0) ; number of channels, ie mono = 1 sampleRate ds.l 1 ; offset: $4 (4) ; sample rate in Apples Fixed point representation sampleSize ds.w 1 ; offset: $8 (8) ; number of bits in sample sizeof EQU * ; size: $A (10) ENDR InstrumentInfoRecord RECORD 0 instrumentNumber ds.l 1 ; offset: $0 (0) ; instrument number (if 0, name is a catagory) flags ds.l 1 ; offset: $4 (4) ; show in picker, etc. toneNameIndex ds.l 1 ; offset: $8 (8) ; index in toneNames (1 based) itxtNameAtomID ds.l 1 ; offset: $C (12) ; index in itxtNames (itxt/name by index) sizeof EQU * ; size: $10 (16) ENDR InstrumentInfoList RECORD 0 recordCount ds.l 1 ; offset: $0 (0) toneNames ds.l 1 ; offset: $4 (4) ; name from tone description itxtNames ds.l 1 ; offset: $8 (8) ; itxt/name atoms for instruments info ds InstrumentInfoRecord ; offset: $C (12) <-- really an array of length one sizeof EQU * ; size: $1C (28) ENDR ; typedef struct InstrumentInfoList * InstrumentInfoListPtr ; typedef InstrumentInfoListPtr * InstrumentInfoListHandle ; ; pascal ComponentResult MusicGetDescription(MusicComponent mc, SynthesizerDescription *sd) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetDescription dc.w $2F3C dc.w $0004 dc.w $0001 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetDescription ENDIF ; ; pascal ComponentResult MusicGetPart(MusicComponent mc, long part, long *midiChannel, long *polyphony) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetPart dc.w $2F3C dc.w $000C dc.w $0002 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetPart ENDIF ; ; pascal ComponentResult MusicSetPart(MusicComponent mc, long part, long midiChannel, long polyphony) ; IF ¬ GENERATINGCFM THEN Macro _MusicSetPart dc.w $2F3C dc.w $000C dc.w $0003 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicSetPart ENDIF ; ; pascal ComponentResult MusicSetPartInstrumentNumber(MusicComponent mc, long part, long instrumentNumber) ; IF ¬ GENERATINGCFM THEN Macro _MusicSetPartInstrumentNumber dc.w $2F3C dc.w $0008 dc.w $0004 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicSetPartInstrumentNumber ENDIF ; ; pascal ComponentResult MusicGetPartInstrumentNumber(MusicComponent mc, long part) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetPartInstrumentNumber dc.w $2F3C dc.w $0004 dc.w $0005 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetPartInstrumentNumber ENDIF ; ; pascal ComponentResult MusicStorePartInstrument(MusicComponent mc, long part, long instrumentNumber) ; IF ¬ GENERATINGCFM THEN Macro _MusicStorePartInstrument dc.w $2F3C dc.w $0008 dc.w $0006 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicStorePartInstrument ENDIF ; ; pascal ComponentResult MusicGetPartAtomicInstrument(MusicComponent mc, long part, AtomicInstrument *ai, long flags) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetPartAtomicInstrument dc.w $2F3C dc.w $000C dc.w $0009 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetPartAtomicInstrument ENDIF ; ; pascal ComponentResult MusicSetPartAtomicInstrument(MusicComponent mc, long part, AtomicInstrumentPtr aiP, long flags) ; IF ¬ GENERATINGCFM THEN Macro _MusicSetPartAtomicInstrument dc.w $2F3C dc.w $000C dc.w $000A moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicSetPartAtomicInstrument ENDIF ; Obsolete calls ; ; pascal ComponentResult MusicGetInstrumentKnobDescriptionObsolete(MusicComponent mc, long knobIndex, void *mkd) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetInstrumentKnobDescriptionObsolete dc.w $2F3C dc.w $0008 dc.w $000D moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetInstrumentKnobDescriptionObsolete ENDIF ; ; pascal ComponentResult MusicGetDrumKnobDescriptionObsolete(MusicComponent mc, long knobIndex, void *mkd) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetDrumKnobDescriptionObsolete dc.w $2F3C dc.w $0008 dc.w $000E moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetDrumKnobDescriptionObsolete ENDIF ; ; pascal ComponentResult MusicGetKnobDescriptionObsolete(MusicComponent mc, long knobIndex, void *mkd) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetKnobDescriptionObsolete dc.w $2F3C dc.w $0008 dc.w $000F moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetKnobDescriptionObsolete ENDIF ; ; pascal ComponentResult MusicGetPartKnob(MusicComponent mc, long part, long knobID) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetPartKnob dc.w $2F3C dc.w $0008 dc.w $0010 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetPartKnob ENDIF ; ; pascal ComponentResult MusicSetPartKnob(MusicComponent mc, long part, long knobID, long knobValue) ; IF ¬ GENERATINGCFM THEN Macro _MusicSetPartKnob dc.w $2F3C dc.w $000C dc.w $0011 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicSetPartKnob ENDIF ; ; pascal ComponentResult MusicGetKnob(MusicComponent mc, long knobID) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetKnob dc.w $2F3C dc.w $0004 dc.w $0012 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetKnob ENDIF ; ; pascal ComponentResult MusicSetKnob(MusicComponent mc, long knobID, long knobValue) ; IF ¬ GENERATINGCFM THEN Macro _MusicSetKnob dc.w $2F3C dc.w $0008 dc.w $0013 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicSetKnob ENDIF ; ; pascal ComponentResult MusicGetPartName(MusicComponent mc, long part, StringPtr name) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetPartName dc.w $2F3C dc.w $0008 dc.w $0014 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetPartName ENDIF ; ; pascal ComponentResult MusicSetPartName(MusicComponent mc, long part, StringPtr name) ; IF ¬ GENERATINGCFM THEN Macro _MusicSetPartName dc.w $2F3C dc.w $0008 dc.w $0015 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicSetPartName ENDIF ; ; pascal ComponentResult MusicFindTone(MusicComponent mc, ToneDescription *td, long *instrumentNumber, unsigned long *fit) ; IF ¬ GENERATINGCFM THEN Macro _MusicFindTone dc.w $2F3C dc.w $000C dc.w $0016 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicFindTone ENDIF ; ; pascal ComponentResult MusicPlayNote(MusicComponent mc, long part, long pitch, long velocity) ; IF ¬ GENERATINGCFM THEN Macro _MusicPlayNote dc.w $2F3C dc.w $000C dc.w $0017 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicPlayNote ENDIF ; ; pascal ComponentResult MusicResetPart(MusicComponent mc, long part) ; IF ¬ GENERATINGCFM THEN Macro _MusicResetPart dc.w $2F3C dc.w $0004 dc.w $0018 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicResetPart ENDIF ; ; pascal ComponentResult MusicSetPartController(MusicComponent mc, long part, MusicController controllerNumber, long controllerValue) ; IF ¬ GENERATINGCFM THEN Macro _MusicSetPartController dc.w $2F3C dc.w $000C dc.w $0019 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicSetPartController ENDIF ; ; pascal ComponentResult MusicGetPartController(MusicComponent mc, long part, MusicController controllerNumber) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetPartController dc.w $2F3C dc.w $0008 dc.w $001A moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetPartController ENDIF ; ; pascal ComponentResult MusicGetMIDIProc(MusicComponent mc, MusicMIDISendUPP *midiSendProc, long *refCon) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetMIDIProc dc.w $2F3C dc.w $0008 dc.w $001B moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetMIDIProc ENDIF ; ; pascal ComponentResult MusicSetMIDIProc(MusicComponent mc, MusicMIDISendUPP midiSendProc, long refCon) ; IF ¬ GENERATINGCFM THEN Macro _MusicSetMIDIProc dc.w $2F3C dc.w $0008 dc.w $001C moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicSetMIDIProc ENDIF ; ; pascal ComponentResult MusicGetInstrumentNames(MusicComponent mc, long modifiableInstruments, Handle *instrumentNames, Handle *instrumentCategoryLasts, Handle *instrumentCategoryNames) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetInstrumentNames dc.w $2F3C dc.w $0010 dc.w $001D moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetInstrumentNames ENDIF ; ; pascal ComponentResult MusicGetDrumNames(MusicComponent mc, long modifiableInstruments, Handle *instrumentNumbers, Handle *instrumentNames) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetDrumNames dc.w $2F3C dc.w $000C dc.w $001E moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetDrumNames ENDIF ; ; pascal ComponentResult MusicGetMasterTune(MusicComponent mc) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetMasterTune dc.w $2F3C dc.w $0000 dc.w $001F moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetMasterTune ENDIF ; ; pascal ComponentResult MusicSetMasterTune(MusicComponent mc, long masterTune) ; IF ¬ GENERATINGCFM THEN Macro _MusicSetMasterTune dc.w $2F3C dc.w $0004 dc.w $0020 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicSetMasterTune ENDIF ; ; pascal ComponentResult MusicGetInstrumentAboutInfo(MusicComponent mc, long part, InstrumentAboutInfo *iai) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetInstrumentAboutInfo dc.w $2F3C dc.w $0008 dc.w $0022 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetInstrumentAboutInfo ENDIF ; ; pascal ComponentResult MusicGetDeviceConnection(MusicComponent mc, long index, long *id1, long *id2) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetDeviceConnection dc.w $2F3C dc.w $000C dc.w $0023 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetDeviceConnection ENDIF ; ; pascal ComponentResult MusicUseDeviceConnection(MusicComponent mc, long id1, long id2) ; IF ¬ GENERATINGCFM THEN Macro _MusicUseDeviceConnection dc.w $2F3C dc.w $0008 dc.w $0024 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicUseDeviceConnection ENDIF ; ; pascal ComponentResult MusicGetKnobSettingStrings(MusicComponent mc, long knobIndex, long isGlobal, Handle *settingsNames, Handle *settingsCategoryLasts, Handle *settingsCategoryNames) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetKnobSettingStrings dc.w $2F3C dc.w $0014 dc.w $0025 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetKnobSettingStrings ENDIF ; ; pascal ComponentResult MusicGetMIDIPorts(MusicComponent mc, long *inputPortCount, long *outputPortCount) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetMIDIPorts dc.w $2F3C dc.w $0008 dc.w $0026 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetMIDIPorts ENDIF ; ; pascal ComponentResult MusicSendMIDI(MusicComponent mc, long portIndex, MusicMIDIPacket *mp) ; IF ¬ GENERATINGCFM THEN Macro _MusicSendMIDI dc.w $2F3C dc.w $0008 dc.w $0027 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicSendMIDI ENDIF ; ; pascal ComponentResult MusicReceiveMIDI(MusicComponent mc, MusicMIDIReadHookUPP readHook, long refCon) ; IF ¬ GENERATINGCFM THEN Macro _MusicReceiveMIDI dc.w $2F3C dc.w $0008 dc.w $0028 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicReceiveMIDI ENDIF ; ; pascal ComponentResult MusicStartOffline(MusicComponent mc, unsigned long *numChannels, UnsignedFixed *sampleRate, unsigned short *sampleSize, MusicOfflineDataUPP dataProc, long dataProcRefCon) ; IF ¬ GENERATINGCFM THEN Macro _MusicStartOffline dc.w $2F3C dc.w $0014 dc.w $0029 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicStartOffline ENDIF ; ; pascal ComponentResult MusicSetOfflineTimeTo(MusicComponent mc, long newTimeStamp) ; IF ¬ GENERATINGCFM THEN Macro _MusicSetOfflineTimeTo dc.w $2F3C dc.w $0004 dc.w $002A moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicSetOfflineTimeTo ENDIF ; ; pascal ComponentResult MusicGetInstrumentKnobDescription(MusicComponent mc, long knobIndex, KnobDescription *mkd) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetInstrumentKnobDescription dc.w $2F3C dc.w $0008 dc.w $002B moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetInstrumentKnobDescription ENDIF ; ; pascal ComponentResult MusicGetDrumKnobDescription(MusicComponent mc, long knobIndex, KnobDescription *mkd) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetDrumKnobDescription dc.w $2F3C dc.w $0008 dc.w $002C moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetDrumKnobDescription ENDIF ; ; pascal ComponentResult MusicGetKnobDescription(MusicComponent mc, long knobIndex, KnobDescription *mkd) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetKnobDescription dc.w $2F3C dc.w $0008 dc.w $002D moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetKnobDescription ENDIF ; ; pascal ComponentResult MusicGetInfoText(MusicComponent mc, long selector, Handle *textH, Handle *styleH) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetInfoText dc.w $2F3C dc.w $000C dc.w $002E moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetInfoText ENDIF kGetInstrumentInfoNoBuiltIn EQU $01 kGetInstrumentInfoMidiUserInst EQU $02 kGetInstrumentInfoNoIText EQU $04 ; ; pascal ComponentResult MusicGetInstrumentInfo(MusicComponent mc, long getInstrumentInfoFlags, InstrumentInfoListHandle *infoListH) ; IF ¬ GENERATINGCFM THEN Macro _MusicGetInstrumentInfo dc.w $2F3C dc.w $0008 dc.w $002F moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGetInstrumentInfo ENDIF ; ; pascal ComponentResult MusicTask(MusicComponent mc) ; IF ¬ GENERATINGCFM THEN Macro _MusicTask dc.w $2F3C dc.w $0000 dc.w $0031 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicTask ENDIF ; ; pascal ComponentResult MusicSetPartInstrumentNumberInterruptSafe(MusicComponent mc, long part, long instrumentNumber) ; IF ¬ GENERATINGCFM THEN Macro _MusicSetPartInstrumentNumberInterruptSafe dc.w $2F3C dc.w $0008 dc.w $0032 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicSetPartInstrumentNumberInterruptSafe ENDIF ; ; pascal ComponentResult MusicSetPartSoundLocalization(MusicComponent mc, long part, Handle data) ; IF ¬ GENERATINGCFM THEN Macro _MusicSetPartSoundLocalization dc.w $2F3C dc.w $0008 dc.w $0033 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicSetPartSoundLocalization ENDIF ; ; pascal ComponentResult MusicGenericConfigure(MusicComponent mc, long mode, long flags, long baseResID) ; IF ¬ GENERATINGCFM THEN Macro _MusicGenericConfigure dc.w $2F3C dc.w $000C dc.w $0100 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGenericConfigure ENDIF ; ; pascal ComponentResult MusicGenericGetPart(MusicComponent mc, long partNumber, GCPart **part) ; IF ¬ GENERATINGCFM THEN Macro _MusicGenericGetPart dc.w $2F3C dc.w $0008 dc.w $0101 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGenericGetPart ENDIF ; ; pascal ComponentResult MusicGenericGetKnobList(MusicComponent mc, long knobType, GenericKnobDescriptionListHandle *gkdlH) ; IF ¬ GENERATINGCFM THEN Macro _MusicGenericGetKnobList dc.w $2F3C dc.w $0008 dc.w $0102 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicGenericGetKnobList ENDIF ; ; pascal ComponentResult MusicDerivedMIDISend(MusicComponent mc, MusicMIDIPacket *packet) ; IF ¬ GENERATINGCFM THEN Macro _MusicDerivedMIDISend dc.w $2F3C dc.w $0004 dc.w $0200 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicDerivedMIDISend ENDIF ; ; pascal ComponentResult MusicDerivedSetKnob(MusicComponent mc, long knobType, long knobNumber, long knobValue, long partNumber, GCPart *p, GenericKnobDescription *gkd) ; IF ¬ GENERATINGCFM THEN Macro _MusicDerivedSetKnob dc.w $2F3C dc.w $0018 dc.w $0201 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicDerivedSetKnob ENDIF ; ; pascal ComponentResult MusicDerivedSetPart(MusicComponent mc, long partNumber, GCPart *p) ; IF ¬ GENERATINGCFM THEN Macro _MusicDerivedSetPart dc.w $2F3C dc.w $0008 dc.w $0202 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicDerivedSetPart ENDIF ; ; pascal ComponentResult MusicDerivedSetInstrument(MusicComponent mc, long partNumber, GCPart *p) ; IF ¬ GENERATINGCFM THEN Macro _MusicDerivedSetInstrument dc.w $2F3C dc.w $0008 dc.w $0203 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicDerivedSetInstrument ENDIF ; ; pascal ComponentResult MusicDerivedSetPartInstrumentNumber(MusicComponent mc, long partNumber, GCPart *p) ; IF ¬ GENERATINGCFM THEN Macro _MusicDerivedSetPartInstrumentNumber dc.w $2F3C dc.w $0008 dc.w $0204 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicDerivedSetPartInstrumentNumber ENDIF ; ; pascal ComponentResult MusicDerivedSetMIDI(MusicComponent mc, MusicMIDISendProcPtr midiProc, long refcon, long midiChannel) ; IF ¬ GENERATINGCFM THEN Macro _MusicDerivedSetMIDI dc.w $2F3C dc.w $000C dc.w $0205 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicDerivedSetMIDI ENDIF ; ; pascal ComponentResult MusicDerivedStorePartInstrument(MusicComponent mc, long partNumber, GCPart *p, long instrumentNumber) ; IF ¬ GENERATINGCFM THEN Macro _MusicDerivedStorePartInstrument dc.w $2F3C dc.w $000C dc.w $0206 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION MusicDerivedStorePartInstrument ENDIF ; Mask bit for returned value by InstrumentFind. kInstrumentExactMatch EQU $00020000 kInstrumentRecommendedSubstitute EQU $00010000 kInstrumentQualityField EQU $FF000000 kInstrumentRoland8BitQuality EQU $05000000 ; typedef struct InstrumentAboutInfo * InstrumentAboutInfoPtr ; typedef InstrumentAboutInfoPtr * InstrumentAboutInfoHandle GMInstrumentInfo RECORD 0 cmpInstID ds.l 1 ; offset: $0 (0) gmInstNum ds.l 1 ; offset: $4 (4) instMatch ds.l 1 ; offset: $8 (8) sizeof EQU * ; size: $C (12) ENDR ; typedef struct GMInstrumentInfo * GMInstrumentInfoPtr ; typedef GMInstrumentInfoPtr * GMInstrumentInfoHandle nonGMInstrumentInfoRecord RECORD 0 cmpInstID ds.l 1 ; offset: $0 (0) ; if 0, category name flags ds.l 1 ; offset: $4 (4) ; match, show in picker toneNameIndex ds.l 1 ; offset: $8 (8) ; index in toneNames (1 based) itxtNameAtomID ds.l 1 ; offset: $C (12) ; index in itxtNames (itxt/name by index) sizeof EQU * ; size: $10 (16) ENDR nonGMInstrumentInfo RECORD 0 recordCount ds.l 1 ; offset: $0 (0) toneNames ds.l 1 ; offset: $4 (4) ; name from tone description itxtNames ds.l 1 ; offset: $8 (8) ; itext/name atoms for instruments instInfo ds nonGMInstrumentInfoRecord ; offset: $C (12) <-- really an array of length one sizeof EQU * ; size: $1C (28) ENDR ; typedef struct nonGMInstrumentInfo * nonGMInstrumentInfoPtr ; typedef nonGMInstrumentInfoPtr * nonGMInstrumentInfoHandle InstCompInfo RECORD 0 infoSize ds.l 1 ; offset: $0 (0) ; size of this record InstrumentLibraryName ds Str31 ; offset: $4 (4) InstrumentLibraryITxt ds.l 1 ; offset: $24 (36) ; itext/name atoms for instruments GMinstrumentCount ds.l 1 ; offset: $28 (40) GMinstrumentInfo ds.l 1 ; offset: $2C (44) GMdrumCount ds.l 1 ; offset: $30 (48) GMdrumInfo ds.l 1 ; offset: $34 (52) nonGMinstrumentCount ds.l 1 ; offset: $38 (56) nonGMinstrumentInfo ds.l 1 ; offset: $3C (60) sizeof EQU * ; size: $40 (64) ENDR ; typedef struct InstCompInfo * InstCompInfoPtr ; typedef InstCompInfoPtr * InstCompInfoHandle ; ; pascal ComponentResult InstrumentGetInst(ComponentInstance ci, long instID, AtomicInstrument *atomicInst, long flags) ; IF ¬ GENERATINGCFM THEN Macro _InstrumentGetInst dc.w $2F3C dc.w $000C dc.w $0001 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION InstrumentGetInst ENDIF ; ; pascal ComponentResult InstrumentGetInfo(ComponentInstance ci, long getInstrumentInfoFlags, InstCompInfoHandle *instInfo) ; IF ¬ GENERATINGCFM THEN Macro _InstrumentGetInfo dc.w $2F3C dc.w $0008 dc.w $0002 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION InstrumentGetInfo ENDIF ; ; pascal ComponentResult InstrumentInitialize(ComponentInstance ci, long initFormat, void *initParams) ; IF ¬ GENERATINGCFM THEN Macro _InstrumentInitialize dc.w $2F3C dc.w $0008 dc.w $0003 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION InstrumentInitialize ENDIF ; ; pascal ComponentResult InstrumentOpenComponentResFile(ComponentInstance ci, short *resFile) ; IF ¬ GENERATINGCFM THEN Macro _InstrumentOpenComponentResFile dc.w $2F3C dc.w $0004 dc.w $0004 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION InstrumentOpenComponentResFile ENDIF ; ; pascal ComponentResult InstrumentCloseComponentResFile(ComponentInstance ci, short resFile) ; IF ¬ GENERATINGCFM THEN Macro _InstrumentCloseComponentResFile dc.w $2F3C dc.w $0002 dc.w $0005 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION InstrumentCloseComponentResFile ENDIF ; ; pascal ComponentResult InstrumentGetComponentRefCon(ComponentInstance ci, void **refCon) ; IF ¬ GENERATINGCFM THEN Macro _InstrumentGetComponentRefCon dc.w $2F3C dc.w $0004 dc.w $0006 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION InstrumentGetComponentRefCon ENDIF ; ; pascal ComponentResult InstrumentSetComponentRefCon(ComponentInstance ci, void *refCon) ; IF ¬ GENERATINGCFM THEN Macro _InstrumentSetComponentRefCon dc.w $2F3C dc.w $0004 dc.w $0007 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION InstrumentSetComponentRefCon ENDIF ; ;-------------------------- ; Types ;-------------------------- ; kSynthesizerConnectionMono EQU 1 ; if set, and synth can be mono/poly, then the partCount channels from the system channel are hogged kSynthesizerConnectionMMgr EQU 2 ; this connection imported from the MIDI Mgr kSynthesizerConnectionOMS EQU 4 ; this connection imported from OMS kSynthesizerConnectionQT EQU 8 ; this connection is a QuickTime-only port kSynthesizerConnectionFMS EQU 16 ; this connection imported from FMS ; used for MIDI device only SynthesizerConnections RECORD 0 clientID ds.l 1 ; offset: $0 (0) inputPortID ds.l 1 ; offset: $4 (4) ; terminology death: this port is used to SEND to the midi synth outputPortID ds.l 1 ; offset: $8 (8) ; terminology death: this port receives from a keyboard or other control device midiChannel ds.l 1 ; offset: $C (12) ; The system channel; others are configurable (or the nubus slot number) flags ds.l 1 ; offset: $10 (16) unique ds.l 1 ; offset: $14 (20) ; unique id may be used instead of index, to getinfo and unregister calls reserved1 ds.l 1 ; offset: $18 (24) ; should be zero reserved2 ds.l 1 ; offset: $1C (28) ; should be zero sizeof EQU * ; size: $20 (32) ENDR QTMIDIPort RECORD 0 portConnections ds SynthesizerConnections ; offset: $0 (0) portName ds Str63 ; offset: $20 (32) sizeof EQU * ; size: $60 (96) ENDR kNoteRequestNoGM EQU 1 ; dont degrade to a GM synth kNoteRequestNoSynthType EQU 2 ; dont degrade to another synth of same type but different name kNoteRequestSynthMustMatch EQU 4 ; synthType must be a match, including kGMSynthComponentSubType ; typedef ComponentInstance NoteAllocator NoteRequestInfo RECORD 0 flags ds.b 1 ; offset: $0 (0) ; 1: dont accept GM match, 2: dont accept same-synth-type match reserved ds.b 1 ; offset: $1 (1) ; must be zero polyphony ds.w 1 ; offset: $2 (2) ; Maximum number of voices typicalPolyphony ds.l 1 ; offset: $4 (4) ; Hint for level mixing sizeof EQU * ; size: $8 (8) ENDR NoteRequest RECORD 0 info ds NoteRequestInfo ; offset: $0 (0) tone ds ToneDescription ; offset: $8 (8) sizeof EQU * ; size: $54 (84) ENDR kPickDontMix EQU 1 ; dont mix instruments with drum sounds kPickSameSynth EQU 2 ; only allow the same device that went in, to come out kPickUserInsts EQU 4 ; show user insts in addition to ROM voices kPickEditAllowEdit EQU 8 ; lets user switch over to edit mode kPickEditAllowPick EQU 16 ; lets the user switch over to pick mode kPickEditSynthGlobal EQU 32 ; edit the global knobs of the synth kPickEditControllers EQU 64 ; edit the controllers of the notechannel kNoteAllocatorComponentType EQU 'nota' ; ;-------------------------------- ; Note Allocator Prototypes ;-------------------------------- ; ; ; pascal ComponentResult NARegisterMusicDevice(NoteAllocator ci, OSType synthType, Str31 name, SynthesizerConnections *connections) ; IF ¬ GENERATINGCFM THEN Macro _NARegisterMusicDevice dc.w $2F3C dc.w $000C dc.w $0000 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NARegisterMusicDevice ENDIF ; ; pascal ComponentResult NAUnregisterMusicDevice(NoteAllocator ci, long index) ; IF ¬ GENERATINGCFM THEN Macro _NAUnregisterMusicDevice dc.w $2F3C dc.w $0004 dc.w $0001 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAUnregisterMusicDevice ENDIF ; ; pascal ComponentResult NAGetRegisteredMusicDevice(NoteAllocator ci, long index, OSType *synthType, Str31 name, SynthesizerConnections *connections, MusicComponent *mc) ; IF ¬ GENERATINGCFM THEN Macro _NAGetRegisteredMusicDevice dc.w $2F3C dc.w $0014 dc.w $0002 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAGetRegisteredMusicDevice ENDIF ; ; pascal ComponentResult NASaveMusicConfiguration(NoteAllocator ci) ; IF ¬ GENERATINGCFM THEN Macro _NASaveMusicConfiguration dc.w $2F3C dc.w $0000 dc.w $0003 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NASaveMusicConfiguration ENDIF ; ; pascal ComponentResult NANewNoteChannel(NoteAllocator ci, NoteRequest *noteRequest, NoteChannel *outChannel) ; IF ¬ GENERATINGCFM THEN Macro _NANewNoteChannel dc.w $2F3C dc.w $0008 dc.w $0004 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NANewNoteChannel ENDIF ; ; pascal ComponentResult NADisposeNoteChannel(NoteAllocator ci, NoteChannel noteChannel) ; IF ¬ GENERATINGCFM THEN Macro _NADisposeNoteChannel dc.w $2F3C dc.w $0004 dc.w $0005 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NADisposeNoteChannel ENDIF ; ; pascal ComponentResult NAGetNoteChannelInfo(NoteAllocator ci, NoteChannel noteChannel, long *index, long *part) ; IF ¬ GENERATINGCFM THEN Macro _NAGetNoteChannelInfo dc.w $2F3C dc.w $000C dc.w $0006 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAGetNoteChannelInfo ENDIF ; ; pascal ComponentResult NAPrerollNoteChannel(NoteAllocator ci, NoteChannel noteChannel) ; IF ¬ GENERATINGCFM THEN Macro _NAPrerollNoteChannel dc.w $2F3C dc.w $0004 dc.w $0007 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAPrerollNoteChannel ENDIF ; ; pascal ComponentResult NAUnrollNoteChannel(NoteAllocator ci, NoteChannel noteChannel) ; IF ¬ GENERATINGCFM THEN Macro _NAUnrollNoteChannel dc.w $2F3C dc.w $0004 dc.w $0008 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAUnrollNoteChannel ENDIF ; ; pascal ComponentResult NASetNoteChannelVolume(NoteAllocator ci, NoteChannel noteChannel, Fixed volume) ; IF ¬ GENERATINGCFM THEN Macro _NASetNoteChannelVolume dc.w $2F3C dc.w $0008 dc.w $000B moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NASetNoteChannelVolume ENDIF ; ; pascal ComponentResult NAResetNoteChannel(NoteAllocator ci, NoteChannel noteChannel) ; IF ¬ GENERATINGCFM THEN Macro _NAResetNoteChannel dc.w $2F3C dc.w $0004 dc.w $000C moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAResetNoteChannel ENDIF ; ; pascal ComponentResult NAPlayNote(NoteAllocator ci, NoteChannel noteChannel, long pitch, long velocity) ; IF ¬ GENERATINGCFM THEN Macro _NAPlayNote dc.w $2F3C dc.w $000C dc.w $000D moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAPlayNote ENDIF ; ; pascal ComponentResult NASetController(NoteAllocator ci, NoteChannel noteChannel, long controllerNumber, long controllerValue) ; IF ¬ GENERATINGCFM THEN Macro _NASetController dc.w $2F3C dc.w $000C dc.w $000E moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NASetController ENDIF ; ; pascal ComponentResult NASetKnob(NoteAllocator ci, NoteChannel noteChannel, long knobNumber, long knobValue) ; IF ¬ GENERATINGCFM THEN Macro _NASetKnob dc.w $2F3C dc.w $000C dc.w $000F moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NASetKnob ENDIF ; ; pascal ComponentResult NAFindNoteChannelTone(NoteAllocator ci, NoteChannel noteChannel, ToneDescription *td, long *instrumentNumber) ; IF ¬ GENERATINGCFM THEN Macro _NAFindNoteChannelTone dc.w $2F3C dc.w $000C dc.w $0010 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAFindNoteChannelTone ENDIF ; ; pascal ComponentResult NASetInstrumentNumber(NoteAllocator ci, NoteChannel noteChannel, long instrumentNumber) ; IF ¬ GENERATINGCFM THEN Macro _NASetInstrumentNumber dc.w $2F3C dc.w $0008 dc.w $0011 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NASetInstrumentNumber ENDIF ; ; pascal ComponentResult NAPickInstrument(NoteAllocator ci, ModalFilterUPP filterProc, StringPtr prompt, ToneDescription *sd, unsigned long flags, long refCon, long reserved1, long reserved2) ; IF ¬ GENERATINGCFM THEN Macro _NAPickInstrument dc.w $2F3C dc.w $001C dc.w $0012 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAPickInstrument ENDIF ; ; pascal ComponentResult NAPickArrangement(NoteAllocator ci, ModalFilterUPP filterProc, StringPtr prompt, long zero1, long zero2, Track t, StringPtr songName) ; IF ¬ GENERATINGCFM THEN Macro _NAPickArrangement dc.w $2F3C dc.w $0018 dc.w $0013 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAPickArrangement ENDIF ; ; pascal ComponentResult NASetDefaultMIDIInput(NoteAllocator ci, SynthesizerConnections *sc) ; IF ¬ GENERATINGCFM THEN Macro _NASetDefaultMIDIInput dc.w $2F3C dc.w $0004 dc.w $0015 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NASetDefaultMIDIInput ENDIF ; ; pascal ComponentResult NAGetDefaultMIDIInput(NoteAllocator ci, SynthesizerConnections *sc) ; IF ¬ GENERATINGCFM THEN Macro _NAGetDefaultMIDIInput dc.w $2F3C dc.w $0004 dc.w $0016 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAGetDefaultMIDIInput ENDIF ; ; pascal ComponentResult NAUseDefaultMIDIInput(NoteAllocator ci, MusicMIDIReadHookUPP readHook, long refCon, unsigned long flags) ; IF ¬ GENERATINGCFM THEN Macro _NAUseDefaultMIDIInput dc.w $2F3C dc.w $000C dc.w $0019 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAUseDefaultMIDIInput ENDIF ; ; pascal ComponentResult NALoseDefaultMIDIInput(NoteAllocator ci) ; IF ¬ GENERATINGCFM THEN Macro _NALoseDefaultMIDIInput dc.w $2F3C dc.w $0000 dc.w $001A moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NALoseDefaultMIDIInput ENDIF ; ; pascal ComponentResult NAStuffToneDescription(NoteAllocator ci, long gmNumber, ToneDescription *td) ; IF ¬ GENERATINGCFM THEN Macro _NAStuffToneDescription dc.w $2F3C dc.w $0008 dc.w $001B moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAStuffToneDescription ENDIF ; ; pascal ComponentResult NACopyrightDialog(NoteAllocator ci, PicHandle p, StringPtr author, StringPtr copyright, StringPtr other, StringPtr title, ModalFilterUPP filterProc, long refCon) ; IF ¬ GENERATINGCFM THEN Macro _NACopyrightDialog dc.w $2F3C dc.w $001C dc.w $001C moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NACopyrightDialog ENDIF ; ; kNADummyOneSelect = 29 ; kNADummyTwoSelect = 30 ; ; ; pascal ComponentResult NAGetIndNoteChannel(NoteAllocator ci, long index, NoteChannel *nc, long *seed) ; IF ¬ GENERATINGCFM THEN Macro _NAGetIndNoteChannel dc.w $2F3C dc.w $000C dc.w $001F moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAGetIndNoteChannel ENDIF ; ; pascal ComponentResult NAGetMIDIPorts(NoteAllocator ci, Handle *inputPorts, Handle *outputPorts) ; IF ¬ GENERATINGCFM THEN Macro _NAGetMIDIPorts dc.w $2F3C dc.w $0008 dc.w $0021 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAGetMIDIPorts ENDIF ; ; pascal ComponentResult NAGetNoteRequest(NoteAllocator ci, NoteChannel noteChannel, NoteRequest *nrOut) ; IF ¬ GENERATINGCFM THEN Macro _NAGetNoteRequest dc.w $2F3C dc.w $0008 dc.w $0022 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAGetNoteRequest ENDIF ; ; pascal ComponentResult NASendMIDI(NoteAllocator ci, NoteChannel noteChannel, MusicMIDIPacket *mp) ; IF ¬ GENERATINGCFM THEN Macro _NASendMIDI dc.w $2F3C dc.w $0008 dc.w $0023 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NASendMIDI ENDIF ; ; pascal ComponentResult NAPickEditInstrument(NoteAllocator ci, ModalFilterUPP filterProc, StringPtr prompt, long refCon, NoteChannel nc, AtomicInstrument ai, long flags) ; IF ¬ GENERATINGCFM THEN Macro _NAPickEditInstrument dc.w $2F3C dc.w $0018 dc.w $0024 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAPickEditInstrument ENDIF ; ; pascal ComponentResult NANewNoteChannelFromAtomicInstrument(NoteAllocator ci, AtomicInstrumentPtr instrument, long flags, NoteChannel *outChannel) ; IF ¬ GENERATINGCFM THEN Macro _NANewNoteChannelFromAtomicInstrument dc.w $2F3C dc.w $000C dc.w $0025 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NANewNoteChannelFromAtomicInstrument ENDIF ; ; pascal ComponentResult NASetAtomicInstrument(NoteAllocator ci, NoteChannel noteChannel, AtomicInstrumentPtr instrument, long flags) ; IF ¬ GENERATINGCFM THEN Macro _NASetAtomicInstrument dc.w $2F3C dc.w $000C dc.w $0026 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NASetAtomicInstrument ENDIF ; ; pascal ComponentResult NAGetKnob(NoteAllocator ci, NoteChannel noteChannel, long knobNumber, long *knobValue) ; IF ¬ GENERATINGCFM THEN Macro _NAGetKnob dc.w $2F3C dc.w $000C dc.w $0028 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NAGetKnob ENDIF ; ; pascal ComponentResult NATask(NoteAllocator ci) ; IF ¬ GENERATINGCFM THEN Macro _NATask dc.w $2F3C dc.w $0000 dc.w $0029 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NATask ENDIF ; ; pascal ComponentResult NASetNoteChannelBalance(NoteAllocator ci, NoteChannel noteChannel, long balance) ; IF ¬ GENERATINGCFM THEN Macro _NASetNoteChannelBalance dc.w $2F3C dc.w $0008 dc.w $002A moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NASetNoteChannelBalance ENDIF ; ; pascal ComponentResult NASetInstrumentNumberInterruptSafe(NoteAllocator ci, NoteChannel noteChannel, long instrumentNumber) ; IF ¬ GENERATINGCFM THEN Macro _NASetInstrumentNumberInterruptSafe dc.w $2F3C dc.w $0008 dc.w $002B moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NASetInstrumentNumberInterruptSafe ENDIF ; ; pascal ComponentResult NASetNoteChannelSoundLocalization(NoteAllocator ci, NoteChannel noteChannel, Handle data) ; IF ¬ GENERATINGCFM THEN Macro _NASetNoteChannelSoundLocalization dc.w $2F3C dc.w $0008 dc.w $002C moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION NASetNoteChannelSoundLocalization ENDIF kTuneQueueDepth EQU 8 ; Deepest you can queue tune segments TuneStatus RECORD 0 tune ds.l 1 ; offset: $0 (0) ; currently playing tune tunePtr ds.l 1 ; offset: $4 (4) ; position within currently playing piece time ds.l 1 ; offset: $8 (8) ; current tune time queueCount ds.w 1 ; offset: $C (12) ; how many pieces queued up? queueSpots ds.w 1 ; offset: $E (14) ; How many more tunepieces can be queued queueTime ds.l 1 ; offset: $10 (16) ; How much time is queued up? (can be very inaccurate) reserved ds.l 3 ; offset: $14 (20) sizeof EQU * ; size: $20 (32) ENDR ; typedef ComponentInstance TunePlayer kTunePlayerType EQU 'tune' ; ; pascal ComponentResult TuneSetHeader(TunePlayer tp, unsigned long *header) ; IF ¬ GENERATINGCFM THEN Macro _TuneSetHeader dc.w $2F3C dc.w $0004 dc.w $0004 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneSetHeader ENDIF ; ; pascal ComponentResult TuneGetTimeBase(TunePlayer tp, TimeBase *tb) ; IF ¬ GENERATINGCFM THEN Macro _TuneGetTimeBase dc.w $2F3C dc.w $0004 dc.w $0005 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneGetTimeBase ENDIF ; ; pascal ComponentResult TuneSetTimeScale(TunePlayer tp, TimeScale scale) ; IF ¬ GENERATINGCFM THEN Macro _TuneSetTimeScale dc.w $2F3C dc.w $0004 dc.w $0006 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneSetTimeScale ENDIF ; ; pascal ComponentResult TuneGetTimeScale(TunePlayer tp, TimeScale *scale) ; IF ¬ GENERATINGCFM THEN Macro _TuneGetTimeScale dc.w $2F3C dc.w $0004 dc.w $0007 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneGetTimeScale ENDIF ; ; pascal ComponentResult TuneGetIndexedNoteChannel(TunePlayer tp, long i, NoteChannel *nc) ; IF ¬ GENERATINGCFM THEN Macro _TuneGetIndexedNoteChannel dc.w $2F3C dc.w $0008 dc.w $0008 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneGetIndexedNoteChannel ENDIF ; Values for when to start. kTuneStartNow EQU 1 ; start after buffer is implied kTuneDontClipNotes EQU 2 ; allow notes to finish their durations outside sample kTuneExcludeEdgeNotes EQU 4 ; dont play notes that start at end of tune kTuneQuickStart EQU 8 ; Leave all the controllers where they are, ignore start time kTuneLoopUntil EQU 16 ; loop a queued tune if there's nothing else in the queue kTuneStartNewMaster EQU 16384 ; ; pascal ComponentResult TuneQueue(TunePlayer tp, unsigned long *tune, Fixed tuneRate, unsigned long tuneStartPosition, unsigned long tuneStopPosition, unsigned long queueFlags, TuneCallBackUPP callBackProc, long refCon) ; IF ¬ GENERATINGCFM THEN Macro _TuneQueue dc.w $2F3C dc.w $001C dc.w $000A moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneQueue ENDIF ; ; pascal ComponentResult TuneInstant(TunePlayer tp, void *tune, long tunePosition) ; IF ¬ GENERATINGCFM THEN Macro _TuneInstant dc.w $2F3C dc.w $0008 dc.w $000B moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneInstant ENDIF ; ; pascal ComponentResult TuneGetStatus(TunePlayer tp, TuneStatus *status) ; IF ¬ GENERATINGCFM THEN Macro _TuneGetStatus dc.w $2F3C dc.w $0004 dc.w $000C moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneGetStatus ENDIF ; Values for stopping. kTuneStopFade EQU 1 ; do a quick, synchronous fadeout kTuneStopSustain EQU 2 ; don't silece notes kTuneStopInstant EQU 4 ; silence notes fast (else, decay them) kTuneStopReleaseChannels EQU 8 ; afterwards, let the channels go ; ; pascal ComponentResult TuneStop(TunePlayer tp, long stopFlags) ; IF ¬ GENERATINGCFM THEN Macro _TuneStop dc.w $2F3C dc.w $0004 dc.w $000D moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneStop ENDIF ; ; pascal ComponentResult TuneSetVolume(TunePlayer tp, Fixed volume) ; IF ¬ GENERATINGCFM THEN Macro _TuneSetVolume dc.w $2F3C dc.w $0004 dc.w $0010 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneSetVolume ENDIF ; ; pascal ComponentResult TuneGetVolume(TunePlayer tp) ; IF ¬ GENERATINGCFM THEN Macro _TuneGetVolume dc.w $2F3C dc.w $0000 dc.w $0011 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneGetVolume ENDIF ; ; pascal ComponentResult TunePreroll(TunePlayer tp) ; IF ¬ GENERATINGCFM THEN Macro _TunePreroll dc.w $2F3C dc.w $0000 dc.w $0012 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TunePreroll ENDIF ; ; pascal ComponentResult TuneUnroll(TunePlayer tp) ; IF ¬ GENERATINGCFM THEN Macro _TuneUnroll dc.w $2F3C dc.w $0000 dc.w $0013 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneUnroll ENDIF ; ; pascal ComponentResult TuneSetNoteChannels(TunePlayer tp, unsigned long count, NoteChannel *noteChannelList, TunePlayCallBackUPP playCallBackProc, long refCon) ; IF ¬ GENERATINGCFM THEN Macro _TuneSetNoteChannels dc.w $2F3C dc.w $0010 dc.w $0014 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneSetNoteChannels ENDIF ; ; pascal ComponentResult TuneSetPartTranspose(TunePlayer tp, unsigned long part, long transpose, long velocityShift) ; IF ¬ GENERATINGCFM THEN Macro _TuneSetPartTranspose dc.w $2F3C dc.w $000C dc.w $0015 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneSetPartTranspose ENDIF ; ; pascal NoteAllocator TuneGetNoteAllocator(TunePlayer tp) ; IF ¬ GENERATINGCFM THEN Macro _TuneGetNoteAllocator dc.w $2F3C dc.w $0000 dc.w $0017 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneGetNoteAllocator ENDIF ; ; pascal ComponentResult TuneSetSofter(TunePlayer tp, long softer) ; IF ¬ GENERATINGCFM THEN Macro _TuneSetSofter dc.w $2F3C dc.w $0004 dc.w $0018 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneSetSofter ENDIF ; ; pascal ComponentResult TuneTask(TunePlayer tp) ; IF ¬ GENERATINGCFM THEN Macro _TuneTask dc.w $2F3C dc.w $0000 dc.w $0019 moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneTask ENDIF ; ; pascal ComponentResult TuneSetBalance(TunePlayer tp, long balance) ; IF ¬ GENERATINGCFM THEN Macro _TuneSetBalance dc.w $2F3C dc.w $0004 dc.w $001A moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneSetBalance ENDIF ; ; pascal ComponentResult TuneSetSoundLocalization(TunePlayer tp, Handle data) ; IF ¬ GENERATINGCFM THEN Macro _TuneSetSoundLocalization dc.w $2F3C dc.w $0004 dc.w $001B moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneSetSoundLocalization ENDIF ; ; pascal ComponentResult TuneSetHeaderWithSize(TunePlayer tp, unsigned long *header, unsigned long size) ; IF ¬ GENERATINGCFM THEN Macro _TuneSetHeaderWithSize dc.w $2F3C dc.w $0008 dc.w $001C moveq #0,d0 dc.w $A82A EndM ELSE IMPORT_CFM_FUNCTION TuneSetHeaderWithSize ENDIF ; typedef unsigned long MusicOpWord ; typedef unsigned long * MusicOpWordPtr ; ; QuickTime Music Track Event Formats: ; ; At this time, QuickTime music tracks support 5 different event types -- REST events, ; short NOTE events, short CONTROL events, short GENERAL events, Long NOTE events, ; long CONTROL events, and variable GENERAL events. ; ; • REST Event (4 bytes/event): ; ; (0 0 0) (5-bit UNUSED) (24-bit Rest Duration) ; ; • Short NOTE Events (4 bytes/event): ; ; (0 0 1) (5-bit Part) (6-bit Pitch) (7-bit Volume) (11-bit Duration) ; ; where: Pitch is offset by 32 (Actual pitch = pitch field + 32) ; ; • Short CONTROL Events (4 bytes/event): ; ; (0 1 0) (5-bit Part) (8-bit Controller) (1-bit UNUSED) (1-bit Sign) (7-bit MSB) (7-bit LSB) ; ( or 15-bit Signed Value) ; • Short GENERAL Event (4 bytes/event): ; ; (0 1 1) (1-bit UNUSED) (12-bit Sub-Type) (16-bit Value) ; ; • Long NOTE Events (8 bytes/event): ; ; (1 0 0 1) (12-bit Part) (1-bit UNUSED) (7-bit Pitch) (1-bit UNUSED) (7-bit Volume) ; (1 0) (8-bit UNUSED) (22-bit Duration) ; ; • Long CONTROL Event (8 bytes/event): ; ; (1 0 1 0) (12-bit Part) (16-bit Value MSB) ; (1 0) (14-bit Controller) (16-bit Value LSB) ; ; • Long KNOB Event (8 bytes/event): ; ; (1 0 1 1) (12-bit Sub-Type) (16-bit Value MSB) ; (1 0) (14-bit KNOB) (16-bit Value LSB) ; ; • Variable GENERAL Length Events (N bytes/event): ; ; (1 1 1 1) (12-bit Sub-Type) (16-bit Length) ; : ; (32-bit Data values) ; : ; (1 1) (14-bit UNUSED) (16-bit Length) ; ; where: Length field is the number of LONG words in the record. ; Lengths include the first and last long words (Minimum length = 2) ; ; The following event type values have not been used yet and are reserved for ; future expansion: ; ; • (1 0 0 0) (8 bytes/event) ; • (1 1 0 0) (N bytes/event) ; • (1 1 0 1) (N bytes/event) ; • (1 1 1 0) (N bytes/event) ; ; For all events, the following generalizations apply: ; ; - All duration values are specified in Millisecond units. ; - Pitch values are intended to map directly to the MIDI key numbers. ; - Controllers from 0 to 127 correspond to the standard MIDI controllers. ; Controllers greater than 127 correspond to other controls (i.e., Pitch Bend, ; Key Pressure, and Channel Pressure). ; ; Defines for the implemented music event data fields kRestEventType EQU $00000000 ; lower 3-bits kNoteEventType EQU $00000001 ; lower 3-bits kControlEventType EQU $00000002 ; lower 3-bits kMarkerEventType EQU $00000003 ; lower 3-bits kUndefined1EventType EQU $00000008 ; 4-bits kXNoteEventType EQU $00000009 ; 4-bits kXControlEventType EQU $0000000A ; 4-bits kKnobEventType EQU $0000000B ; 4-bits kUndefined2EventType EQU $0000000C ; 4-bits kUndefined3EventType EQU $0000000D ; 4-bits kUndefined4EventType EQU $0000000E ; 4-bits kGeneralEventType EQU $0000000F ; 4-bits kXEventLengthBits EQU $00000002 ; 2 bits: indicates 8-byte event record kGeneralEventLengthBits EQU $00000003 ; 2 bits: indicates variable length event record kEventLen EQU 1 ; length of events in long words kXEventLen EQU 2 kRestEventLen EQU 1 ; length of events in long words kNoteEventLen EQU 1 kControlEventLen EQU 1 kMarkerEventLen EQU 1 kXNoteEventLen EQU 2 kXControlEventLen EQU 2 kGeneralEventLen EQU 2 ; 2 or more, however ; Universal Event Defines kEventLengthFieldPos EQU 30 ; by looking at these two bits of the 1st or last word kEventLengthFieldWidth EQU 2 ; of an event you can determine the event length ; length field: 0 & 1 => 1 long; 2 => 2 longs; 3 => variable length kEventTypeFieldPos EQU 29 ; event type field for short events kEventTypeFieldWidth EQU 3 ; short type is 3 bits kXEventTypeFieldPos EQU 28 ; event type field for extended events kXEventTypeFieldWidth EQU 4 ; extended type is 4 bits kEventPartFieldPos EQU 24 kEventPartFieldWidth EQU 5 kXEventPartFieldPos EQU 16 ; in the 1st long word kXEventPartFieldWidth EQU 12 ; Rest Events kRestEventDurationFieldPos EQU 0 kRestEventDurationFieldWidth EQU 24 kRestEventDurationMax EQU $00FFFFFF ; Note Events kNoteEventPitchFieldPos EQU 18 kNoteEventPitchFieldWidth EQU 6 kNoteEventPitchOffset EQU 32 ; add to value in pitch field to get actual pitch kNoteEventVolumeFieldPos EQU 11 kNoteEventVolumeFieldWidth EQU 7 kNoteEventVolumeOffset EQU 0 ; add to value in volume field to get actual volume kNoteEventDurationFieldPos EQU 0 kNoteEventDurationFieldWidth EQU 11 kNoteEventDurationMax EQU $000007FF kXNoteEventPitchFieldPos EQU 0 ; in the 1st long word kXNoteEventPitchFieldWidth EQU 16 kXNoteEventDurationFieldPos EQU 0 ; in the 2nd long word kXNoteEventDurationFieldWidth EQU 22 kXNoteEventDurationMax EQU $003FFFFF kXNoteEventVolumeFieldPos EQU 22 ; in the 2nd long word kXNoteEventVolumeFieldWidth EQU 7 ; Control Events kControlEventControllerFieldPos EQU 16 kControlEventControllerFieldWidth EQU 8 kControlEventValueFieldPos EQU 0 kControlEventValueFieldWidth EQU 16 kXControlEventControllerFieldPos EQU 0 ; in the 2nd long word kXControlEventControllerFieldWidth EQU 16 kXControlEventValueFieldPos EQU 0 ; in the 1st long word kXControlEventValueFieldWidth EQU 16 ; Knob Events kKnobEventValueHighFieldPos EQU 0 ; 1st long word kKnobEventValueHighFieldWidth EQU 16 kKnobEventKnobFieldPos EQU 16 ; 2nd long word kKnobEventKnobFieldWidth EQU 14 kKnobEventValueLowFieldPos EQU 0 ; 2nd long word kKnobEventValueLowFieldWidth EQU 16 ; Marker Events kMarkerEventSubtypeFieldPos EQU 16 kMarkerEventSubtypeFieldWidth EQU 8 kMarkerEventValueFieldPos EQU 0 kMarkerEventValueFieldWidth EQU 16 ; General Events kGeneralEventSubtypeFieldPos EQU 16 ; in the last long word kGeneralEventSubtypeFieldWidth EQU 14 kGeneralEventLengthFieldPos EQU 0 ; in the 1st & last long words kGeneralEventLengthFieldWidth EQU 16 ; General Event Defined Types kGeneralEventNoteRequest EQU 1 ; Encapsulates NoteRequest data structure kGeneralEventPartKey EQU 4 kGeneralEventTuneDifference EQU 5 ; Contains a standard sequence, with end marker, for the tune difference of a sequence piece (halts QuickTime 2.0 Music) kGeneralEventAtomicInstrument EQU 6 ; Encapsulates AtomicInstrument record kGeneralEventKnob EQU 7 ; knobID/knobValue pairs; smallest event is 4 longs kGeneralEventMIDIChannel EQU 8 ; used in tune header, one longword identifies the midi channel it originally came from kGeneralEventPartChange EQU 9 ; used in tune sequence, one longword identifies the tune part which can now take over this part's note channel (similar to program change) (halts QuickTime 2.0 Music) kGeneralEventNoOp EQU 10 ; guaranteed to do nothing and be ignored. (halts QuickTime 2.0 Music) kGeneralEventUsedNotes EQU 11 ; four longwords specifying which midi notes are actually used, 0..127 msb to lsb ; Marker Event Defined Types // marker is 60 ee vv vv in hex, where e = event type, and v = value kMarkerEventEnd EQU 0 ; marker type 0 means: value 0 - stop, value != 0 - ignore kMarkerEventBeat EQU 1 ; value 0 = single beat; anything else is 65536ths-of-a-beat (quarter note) kMarkerEventTempo EQU 2 ; value same as beat marker, but indicates that a tempo event should be computed (based on where the next beat or tempo marker is) and emitted upon export ; UPP call backs ENDIF ; __QUICKTIMEMUSIC__